<?php
class DataBaseController {

	protected static $connection;

	public static function connect() {
		$connection=mysql_connect('mysql.webio.pl', '2217_endq', 'flash2023*');
		if ($connection){
			if (!mysql_select_db('2217_endqtest', $connection)){
				MessageController::returnMessage("Can\'t choose db");
			}
		}else{
			MessageController::returnMessage("Connection error");
		}
	}
	
	public static function execute($string) {
		
		return mysql_query($string);
		
	}
	
	public static function row($string) {
		
		return mysql_fetch_assoc(mysql_query($string));
		
	}

}
?>